import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'

Vue.use(VueRouter)





const routes = [
  {
	  // 首页
    path: '/home',
    name: 'Home',
    component: Home
  },
  {
	  //分类
    path: '/sort',
    name: 'Sort',
    component: () => import( '../views/Sort.vue')
  },
  {
	  //消息
    path: '/news',
    name: 'News',
    component: () => import( '../views/News.vue')
  },
  {
	  //购物车
    path: '/cart',
    name: 'Cart',
    component: () => import( '../views/Cart.vue')
  },
  {
	  //我的
    path: '/mine',
    name: 'Mine',
    component: () => import( '../views/Mine.vue')
  },
  {
	  // 注册
    path: '/register',
    name: 'Register',
    component: () => import( '../components/Register.vue')
  },
  {
	  //登录
    path: '/login',
    name: 'Login',
   
    component: () => import('../components/Login.vue')
  },
]



const router = new VueRouter({
  routes,
  // mode:'history'
})

export default router
